package com.reform.service;

import com.reform.pojo.expert.Expert;
import com.baomidou.mybatisplus.extension.service.IService;
import com.reform.res.Result;

import javax.servlet.http.HttpServletRequest;
import java.sql.SQLException;
import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author mortale
 * @since 2021-06-26
 */
public interface IExpertService extends IService<Expert> {

    boolean chargeExpertAuth(String gh);

    /**
     * 通过batchId获取专家信息
     * @param batchId
     * @return
     * @throws SQLException
     */
    Result getExpertByBatchId(String batchId) throws SQLException;

    /**
     * 创建专家信息
     * @param experts
     * @return
     * @throws SQLException
     */
    Result creatExpert(String experts) throws SQLException;

    /**
     * 删除专家信息
     * @param experts
     * @return
     */
    Result deleteExpert(String experts) throws SQLException;

    /**
     * 获取所有专家信息
     * @return
     * @throws SQLException
     */
    Result getExperts() throws SQLException;

    /**
     * 通过专家工号获取阶段信息
     * @param gh
     * @param type
     * @return
     */
    List<String> getBatchIdByGH(String gh,Integer type) throws SQLException;

    /**
     * 通过教师工号获取专家batchId信息
     * @param request
     * @return
     */
    Result getBatchInfo(HttpServletRequest request) throws SQLException;

    /**
     * 通过教师工号获取专家phaseId信息
     * @param request
     * @return
     */
    Result getPhaseInfo(HttpServletRequest request) throws SQLException;
}
